import request from '/@/utils/request';
/**
 * /agendaMatter/getMatterCodes   name:getMatterCodes  获取事项编码列表
 * /agendaMatter/getCalendarData   name:timeGetEventData  获取事项编码列表
 * /agendaMatter/modifyActionTime   name:modifyActionTime  修改时间列表
 * /agendaMatterGroup/getMatterItems   name:getMatterItems  获取可发起事项列表
 * /agendaMatter/modifyMatter   name:modifyMatter  修改事项
 * /candidateMatter/addInitialSift   name:addInitialSift  添加初筛事项
 * /candidateMatter/addPlanInterview   name:addPlanInterview  添加候选人安排面试事项
 * /candidateMatter/addInterviewEvaluate   name:addInterviewEvaluate  添加候选人面试评价
 * /candidateMatter/addExamRecord  name:addExamRecord  添加候选人笔试记录事项
 * /candidateMatter/addPreOfferInteract  name:addPreOfferInteract  添加候选人Offer前沟通事项
 * /candidateMatter/addBeObsolete name:addBeObsolete  候选人被淘汰事项
 * /candidateMatter/addGiveUpEntry name:addGiveUpEntry  放弃入职
 * /staffMatter/addContract name:addContract  员工合同事项
 * /staffMatter/addOfficial name:addOfficial  员工转正事项
 * /staffMatter/addTrainRecord name:addTrainRecord  员工培训记录事项
 * /staffMatter/addPositionChange name:addPositionChange  员工（职位）异动事项
 * /staffMatter/addApplyQuit  name: addApplyQuit 申请离职
 * /staffMatter/addBonusPenalty name: addBonusPenalty 员工奖惩事项
 * /agendaMatter/getInfo  name: getInfo 获取事项详情
 * /agendaMatter/getMatterPage name:getMatterPage 获取本人的事项
 */
interface requestBody {
    params?:object,
}
const version:string = '/matter'
export  function homeApi(){
    return {
        getMatterCodes:(params:requestBody)=>{
            return request({
                url:version + '/agendaMatter/getMatterCodes',
				method: 'get',
				params,
            })
        },
        timeGetEventData:(params:requestBody)=>{
            return request({
                url:version + '/agendaMatter/getCalendarData',
				method: 'get',
				params,
            })
        },
        modifyActionTime:(data:requestBody)=>{
            return request({
                url:version + '/agendaMatter/modifyActionTime',
				method: 'post',
				data,
            })
        },
        getMatterItems:(params:requestBody)=>{
            return request({
                url:version + '/agendaMatterGroup/getMatterItems',
				method: 'get',
				params,
            })
        },
        modifyMatter:(data:requestBody)=>{
            return request({
                url:version + '/agendaMatter/modifyMatter',
				method: 'post',
				data,
            })
        },
        // 获取事项详情
        getInfo: (data:requestBody)=>{
            return request({
                url: version + '/agendaMatter/getInfo',
                method: 'get',
                params: data
            })
        },
        addInitialSift:(data:requestBody)=>{
            return request({
                url:version + '/candidateMatter/addInitialSift',
				method: 'post',
				data,
            })
        },
        addPlanInterview:(data:requestBody)=>{
            return request({
                url:version + '/candidateMatter/addPlanInterview',
				method: 'post',
				data,
            })
        },
        addExamRecord:(data:requestBody)=>{
            return request({
                url:version + '/candidateMatter/addExamRecord',
				method: 'post',
				data,
            })
        },
        addPreOfferInteract:(data:requestBody)=>{
            return request({
                url:version + '/candidateMatter/addPreOfferInteract',
				method: 'post',
				data,
            })
        },
        addNewOffer:(data:requestBody)=>{
            return request({
                url:version + '/candidateMatter/addNewOffer',
				method: 'post',
				data,
            })
        },
        addBeObsolete:(data:requestBody)=>{
            return request({
                url:version + '/candidateMatter/addBeObsolete',
				method: 'post',
				data,
            })
        },
        addGiveUpEntry:(data:requestBody)=>{
            return request({
                url:version + '/candidateMatter/addGiveUpEntry',
				method: 'post',
				data,
            })
        },
        addContract:(data:requestBody)=>{
            return request({
                url:version + '/staffMatter/addContract',
				method: 'post',
				data,
            })
        },
        addOfficial:(data:requestBody)=>{
            return request({
                url:version + '/staffMatter/addOfficial',
				method: 'post',
				data,
            })
        },
        addTrainRecord:(data:requestBody)=>{
            return request({
                url:version + '/staffMatter/addTrainRecord',
				method: 'post',
				data,
            })
        },
        addPositionChange:(data:requestBody)=>{
            return request({
                url:version + '/staffMatter/addPositionChange',
				method: 'post',
				data,
            })
        },
        // 申请离职
        addApplyQuit:(data:requestBody) => {
            return request({
                url:version + '/staffMatter/addApplyQuit',
				method: 'post',
				data,
            })
        },
        // 面试评价
        addInterviewEvaluate: (data:requestBody) => {
            return request({
                url:version + '/candidateMatter/addInterviewEvaluate',
				method: 'post',
				data,
            })
        },
        // 奖惩事项
        addBonusPenalty: (data:requestBody) => {
            return request({
                url:version + '/staffMatter/addBonusPenalty',
				method: 'post',
				data,
            })
        },
        // 事项分页数据
      getMatterPage: (data:requestBody) => {
            return request({
                url:version + '/agendaMatter/getMatterPage',
				method: 'get',
				params: data,
            })
        }
    }
}
